package com.ask.service;

import com.ask.dto.*;
import com.ask.entity.Orders;
import com.ask.result.PageResult;
import com.ask.vo.OrderPaymentVO;
import com.ask.vo.OrderStatisticsVO;
import com.ask.vo.OrderSubmitVO;
import com.ask.vo.OrderVO;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface OrderService {
    OrderSubmitVO submitOrder(OrderDTO orderDTO);

    OrderVO orderDetail(Long id);

    PageResult pageQuery4User(Integer page, Integer pageSize, Integer status);

    void cancelOrder(Long orderId);

    void repetition(Long id);

    PageResult pageQuery(OrdersPageQueryDTO dto);

    OrderStatisticsVO getStatistics();

    void confirmOrder(Long id);

    void cancel(OrdersCancelDTO ordersCancelDTO);

    void deliveryOrder(Long id);

    void completeOrder(Long id);

    void rejectOrder(OrderRejectDTO orderRejectDTO);

    /**
     * 订单支付
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);

    /**
     * 催单
     * @param id
     */
    void reminder(Long id);

    /**
     * 批量插入
     * @param ordersList
     */
    void insertBatch(List<Orders> ordersList);

    /**
     * 根据用户id删除
     * @param userId
     */
    void deleteByUserId(Long userId);


}
